package impl

import (
	"context"
	"deployment-service/domain"
	"github.com/bndr/gojenkins"
)

func getGOJenkins(ctx context.Context, jenkinsEntity domain.JenkinsEntity) *gojenkins.Jenkins {
	var jenkins *gojenkins.Jenkins
	jenkins = gojenkins.CreateJenkins(
		nil,
		jenkinsEntity.Url,
		jenkinsEntity.UserName,
		jenkinsEntity.Token)

	jenkins.Init(ctx)
	return jenkins
}

